﻿Public Class MainForm
    Private Sub CabangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterCabang Is Nothing Then
            fMasterCabang = New FormMasterCabang
            fMasterCabang.MdiParent = Me
            fMasterCabang.Show()
        End If
    End Sub

    Private Sub KasBankToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterKasBank Is Nothing Then
            fMasterKasBank = New FormMasterKasBank
            fMasterKasBank.MdiParent = Me
            fMasterKasBank.Show()
        End If
    End Sub

    Private Sub BusinessPartnerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterBusinessPartner Is Nothing Then
            fMasterBusinessPartner = New FormMasterBusinessPartner
            fMasterBusinessPartner.MdiParent = Me
            fMasterBusinessPartner.Show()
        End If
    End Sub


    Private Sub CabangGudangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterCabangGudang Is Nothing Then
            fMasterCabangGudang = New FormMasterCabangGudang
            fMasterCabangGudang.MdiParent = Me
            fMasterCabangGudang.Show()
        End If
    End Sub

    Private Sub CabangGudangBarangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterCabangGudangBarang Is Nothing Then
            fMasterCabangGudangBarang = New FormMasterCabangGudangBarang
            fMasterCabangGudangBarang.MdiParent = Me
            fMasterCabangGudangBarang.Show()
        End If
    End Sub

    Private Sub CabangPaketToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterCabangPaket Is Nothing Then
            fMasterCabangPaket = New FormMasterCabangPaket
            fMasterCabangPaket.MdiParent = Me
            fMasterCabangPaket.Show()
        End If
    End Sub

    Private Sub CabangPaketDetailToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterCabangPaketDetail Is Nothing Then
            fMasterCabangPaketDetail = New FormMasterCabangPaketDetail
            fMasterCabangPaketDetail.MdiParent = Me
            fMasterCabangPaketDetail.Show()
        End If
    End Sub

    Private Sub PointSupplierToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterPointSupplier Is Nothing Then
            fMasterPointSupplier = New FormMasterPoinSupplier
            fMasterPointSupplier.MdiParent = Me
            fMasterPointSupplier.Show()
        End If
    End Sub

    Private Sub PointSupplierBarangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterPointSupplierBarang Is Nothing Then
            fMasterPointSupplierBarang = New FormMasterPointSupplierBarang
            fMasterPointSupplierBarang.MdiParent = Me
            fMasterPointSupplierBarang.Show()
        End If
    End Sub

    Private Sub PointSupplierJumlahToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If fMasterPointSupplierJumlah Is Nothing Then
            fMasterPointSupplierJumlah = New FormMasterPointSupplierJumlah
            fMasterPointSupplierJumlah.MdiParent = Me
            fMasterPointSupplierJumlah.Show()
        End If
    End Sub

    Private Sub PurchaseOrderToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PurchaseOrderToolStripMenuItem.Click
        If fPurchaseOrder Is Nothing Then
            fPurchaseOrder = New FormListPO
            fPurchaseOrder.MdiParent = Me
            fPurchaseOrder.Show()
        End If
    End Sub

    Private Sub PenerimaanBarangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PenerimaanBarangToolStripMenuItem.Click
        If fBuktiPenerimaanBarang Is Nothing Then
            fBuktiPenerimaanBarang = New FormListBPB
            fBuktiPenerimaanBarang.MdiParent = Me
            fBuktiPenerimaanBarang.Show()
        End If
    End Sub

    Private Sub InvoiceBarangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InvoiceBarangToolStripMenuItem.Click
        If fInvoicePembelian Is Nothing Then
            fInvoicePembelian = New FormListInvoicePO
            fInvoicePembelian.MdiParent = Me
            fInvoicePembelian.Show()
        End If
    End Sub

    Private Sub ReturPembelianToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReturPembelianToolStripMenuItem.Click
        If fReturPembelian Is Nothing Then
            fReturPembelian = New FormListReturPembelian
            fReturPembelian.MdiParent = Me
            fReturPembelian.Show()
        End If
    End Sub

    Private Sub NotaDebetToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NotaDebetToolStripMenuItem.Click
        If fNotaDebet Is Nothing Then
            fNotaDebet = New FormListNotaDebet
            fNotaDebet.MdiParent = Me
            fNotaDebet.Show()
        End If
    End Sub

    Private Sub NotaKreditToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NotaKreditToolStripMenuItem.Click
        If fNotaKredit Is Nothing Then
            fNotaKredit = New FormListNotaKredit
            fNotaKredit.MdiParent = Me
            fNotaKredit.Show()
        End If
    End Sub

    Private Sub DownPaymentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DownPaymentToolStripMenuItem.Click
        If fPrePayment Is Nothing Then
            fPrePayment = New FormListPrePayment
            fPrePayment.MdiParent = Me
            fPrePayment.Show()
        End If
    End Sub

    Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub KelompokBarangToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KelompokBarangToolStripMenuItem1.Click
        If fMasterKelompokBarang Is Nothing Then
            fMasterKelompokBarang = New FormMasterKelompokBarang
            fMasterKelompokBarang.MdiParent = Me
            fMasterKelompokBarang.Show()
        End If
    End Sub

    Private Sub SubKelompokBarangToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubKelompokBarangToolStripMenuItem1.Click
        If fMasterSubKelompokBarang Is Nothing Then
            fMasterSubKelompokBarang = New FormMasterSubKelompokBarang
            fMasterSubKelompokBarang.MdiParent = Me
            fMasterSubKelompokBarang.Show()
        End If
    End Sub

    Private Sub MerkBarangToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MerkBarangToolStripMenuItem1.Click
        If fMasterMerkBarang Is Nothing Then
            fMasterMerkBarang = New FormMasterMerkBarang
            fMasterMerkBarang.MdiParent = Me
            fMasterMerkBarang.Show()
        End If
    End Sub

    Private Sub SpesifikasiToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpesifikasiToolStripMenuItem.Click
        If fMasterSpesifikasi Is Nothing Then
            fMasterSpesifikasi = New FormMasterSpec
            fMasterSpesifikasi.MdiParent = Me
            fMasterSpesifikasi.Show()
        End If
    End Sub

    Private Sub BarangToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BarangToolStripMenuItem2.Click
        If fMasterBarang Is Nothing Then
            fMasterBarang = New FormMasterBarang
            fMasterBarang.MdiParent = Me
            fMasterBarang.Show()
        End If
    End Sub

    Private Sub MasterUserToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterUserToolStripMenuItem.Click
        If fMasterUser Is Nothing Then
            fMasterUser = New FormMasterUser
            fMasterUser.MdiParent = Me
            fMasterUser.Show()
        End If
    End Sub

    Private Sub MasterUserMenuProgramToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterUserMenuProgramToolStripMenuItem.Click
        If fMasterUserMenuProgram Is Nothing Then
            fMasterUserMenuProgram = New FormMasterUserMenuProgram
            fMasterUserMenuProgram.MdiParent = Me
            fMasterUserMenuProgram.Show()
        End If
    End Sub

    Private Sub MasterValutaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterValutaToolStripMenuItem.Click
        If fMasterValuta Is Nothing Then
            fMasterValuta = New FormMasterValuta
            fMasterValuta.MdiParent = Me
            fMasterValuta.Show()
        End If
    End Sub

    Private Sub MasterValutaHarianToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterValutaHarianToolStripMenuItem.Click
        If fMasterValutaHarian Is Nothing Then
            fMasterValutaHarian = New FormMasterValutaHarian
            fMasterValutaHarian.MdiParent = Me
            fMasterValutaHarian.Show()
        End If
    End Sub

    Private Sub MasterBankToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterBankToolStripMenuItem.Click
        If fMasterBank Is Nothing Then
            fMasterBank = New FormMasterBank
            fMasterBank.MdiParent = Me
            fMasterBank.Show()
        End If
    End Sub

    Private Sub MasterKategoriBiayaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterKategoriBiayaToolStripMenuItem.Click
        If fMasterKategoriBiaya Is Nothing Then
            fMasterKategoriBiaya = New FormMasterKategoriBiaya
            fMasterKategoriBiaya.MdiParent = Me
            fMasterKategoriBiaya.Show()
        End If
    End Sub

    Private Sub MasterBiayaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterBiayaToolStripMenuItem.Click
        If fMasterBiaya Is Nothing Then
            fMasterBiaya = New FormMasterBiaya
            fMasterBiaya.MdiParent = Me
            fMasterBiaya.Show()
        End If
    End Sub

    Private Sub MasterCabangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterCabangToolStripMenuItem.Click
        If fMasterCabang Is Nothing Then
            fMasterCabang = New FormMasterCabang
            fMasterCabang.MdiParent = Me
            fMasterCabang.Show()
        End If
    End Sub

    Private Sub MasterKasBankToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterKasBankToolStripMenuItem.Click
        If fMasterKasBank Is Nothing Then
            fMasterKasBank = New FormMasterKasBank
            fMasterKasBank.MdiParent = Me
            fMasterKasBank.Show()
        End If
    End Sub

    Private Sub MasterBusinessPartnerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterBusinessPartnerToolStripMenuItem.Click
        If fMasterBusinessPartner Is Nothing Then
            fMasterBusinessPartner = New FormMasterBusinessPartner
            fMasterBusinessPartner.MdiParent = Me
            fMasterBusinessPartner.Show()
        End If
    End Sub

    Private Sub MasterPromoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterPromoToolStripMenuItem.Click
        If fMasterPromoSupplier Is Nothing Then
            fMasterPromoSupplier = New FormMasterPromoSupplier
            fMasterPromoSupplier.MdiParent = Me
            fMasterPromoSupplier.Show()
        End If
    End Sub

    Private Sub MasterCabangGudangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterCabangGudangToolStripMenuItem.Click
        If fMasterCabangGudang Is Nothing Then
            fMasterCabangGudang = New FormMasterCabangGudang
            fMasterCabangGudang.MdiParent = Me
            fMasterCabangGudang.Show()
        End If
    End Sub

    Private Sub MasterPaketToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterPaketToolStripMenuItem.Click
        If fMasterCabangPaket Is Nothing Then
            fMasterCabangPaket = New FormMasterCabangPaket
            fMasterCabangPaket.MdiParent = Me
            fMasterCabangPaket.Show()
        End If
    End Sub
End Class
